<html><head><title>Preference.pb</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font><font color="#3A3966">;   PureBasic - Preference example file
</font><font color="#3A3966">;
</font><font color="#3A3966">;    (c) Fantaisie Software
</font><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font>
<b><font color="#3A3966">If</font></b> <font color="#3A3966">CreatePreferences</font>(<font color="#3A3966">GetTemporaryDirectory</font>()+&quot;Preferences.prefs&quot;)
<font color="#3A3966">  PreferenceGroup</font>(&quot;Global&quot;)
<font color="#3A3966">    WritePreferenceString</font>(&quot;ApplicationName&quot;, &quot;MP3 Player&quot;)
<font color="#3A3966">    WritePreferenceString</font>(&quot;Version&quot;, &quot;1.1b&quot;)

<font color="#3A3966">  PreferenceComment</font>(&quot; This is the Window dimension&quot;)
<font color="#3A3966">  PreferenceComment</font>(&quot;&quot;)

<font color="#3A3966">  PreferenceGroup</font>(&quot;Window&quot;)
<font color="#3A3966">    WritePreferenceLong </font>(&quot;WindowX&quot;, 123)
<font color="#3A3966">    WritePreferenceLong </font>(&quot;WindowY&quot;, 124)
<font color="#3A3966">    WritePreferenceFloat</font>(&quot;WindowZ&quot;, -125.5)

<font color="#3A3966">  ClosePreferences</font>()
<b><font color="#3A3966">EndIf</font></b>


<font color="#3A3966">OpenPreferences</font>(<font color="#3A3966">GetTemporaryDirectory</font>()+&quot;Preferences.prefs&quot;)

<font color="#3A3966">  PreferenceGroup</font>(&quot;Window&quot;)
    <b><font color="#3A3966">Debug</font></b> <font color="#3A3966">ReadPreferenceLong </font>(&quot;WindowX&quot;, 0)
    <b><font color="#3A3966">Debug</font></b> <font color="#3A3966">ReadPreferenceLong </font>(&quot;WindowY&quot;, 0)
    <b><font color="#3A3966">Debug</font></b> <font color="#3A3966">ReadPreferenceFloat</font>(&quot;WindowZ&quot;, 0)
    
<font color="#3A3966">  PreferenceGroup</font>(&quot;Global&quot;)
    <b><font color="#3A3966">Debug</font></b> <font color="#3A3966">ReadPreferenceString</font>(&quot;ApplicationName&quot;, &quot;&quot;)
    <b><font color="#3A3966">Debug</font></b> <font color="#3A3966">ReadPreferenceString</font>(&quot;Version&quot;, &quot;&quot;)
    
<font color="#3A3966">ClosePreferences</font>()</font></pre>
</body></html>
